perm filename MIDT77[206,JMC] blob sn#280568 filedate 1977-05-02 generic text, type C, neo UTF8
COMMENT āŠ—   VALID 00002 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	.require "book.pub[let,jmc]" source_file
C00005 ENDMK
CāŠ—;
.require "book.pub[let,jmc]" source_file;
.font B "ms25";
.font C "grfx25"
.font D "grfx35"
.TURN OFF "{}āˆ‚[]"
.cb	CS206	Computing with Symbolic Expressions	Spring 1977
.cb	Midterm Examination
.cb	May 2 1977
.skip 2

.FILL

Write the following routines using either Maclisp or Blackboard notation.

You may use any books or notes that you wish on this test.

.SKIP 2
1.a. %2Least[u]%1 is the least integer in the list %2u%1 of integers.

b. %2Least1[x]%1 is the least integer in the s-expression %2x%1, all of whose
atoms are assumed to be integers.
.SKIP 1
2. Let %2e%1 be a Lisp term in internal notation. %2Frees[e]%1 returns a list of
the free variables in %2e%1. Remember that labels in PROGs are not free
variables.  Forget about the problems that are caused by considering FEXPRS;
i.e. assume that all arguments to functions WILL be evaluated. If you have extra
time, explain for extra credit why you are glad to make this assumption.
.SKIP 1
3. The polynomial %2a0 + a1*x + ... +an*x↑n%1 may be represented by the list:
%2(a0 a1 ... an)%1 of its coefficients.

a. %2Quot[p1,p2]%1 is the quotient of the polynomials %2p1%1 and %2p2%1.

b. %2Rem[p1,p2]%1 is the remainder polynomial.